package com.wayhome.srpingbootmybatis.fileimportmanager.enums;

import com.wayhome.srpingbootmybatis.mbs.util.TldyAuditEmum;

public enum MedTypeEnum {

    MED_TYPE_11("11", "普通门诊"),
    MED_TYPE_12("12", "门诊挂号"),
    MED_TYPE_14("14", "门诊慢特病"),
    MED_TYPE_21("21", "普通住院"),
    MED_TYPE_22("22", "外伤住院"),
    MED_TYPE_23("23", "转外诊治住院"),
    MED_TYPE_41("41", "定点药店购药"),
    MED_TYPE_9107("9107", "体检"),
            ;

    private MedTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private String code;
    private String msg;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String getMsgByCode(String code) {
        for (MedTypeEnum item : MedTypeEnum.values()) {
            if (item.code.equals(code)) {
                return item.msg;
            }
        }
        return null;
    }

    public static String getCodeByMsg(String msg) {
        for (MedTypeEnum item : MedTypeEnum.values()) {
            if (item.msg.equals(msg)) {
                return item.code;
            }
        }
        return null;
    }


}
